package com.atguigu.tingshu.account.service;

import com.atguigu.tingshu.model.account.RechargeInfo;
import com.atguigu.tingshu.model.account.UserAccountDetail;
import com.atguigu.tingshu.vo.account.RechargeInfoVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

public interface RechargeInfoService extends IService<RechargeInfo> {

    /**
     * 根据充值订单编号查询充值信息
     *
     * @param orderNo
     * @return
     */
    RechargeInfo getRechargeInfo(String orderNo);

    /**
     * 保存充值记录
     *
     * @param rechargeInfoVo
     * @return {orderNo:"充值订单编号"} 对接微信支付接口
     */
    Map<String, String> submitRecharge(RechargeInfoVo rechargeInfoVo);

    /**
     * 用户付款后处理充值成功业务
     *
     * @param orderNo
     */
    void rechargePaySuccess(String orderNo);


    /**
     * 根据交易类型分页查询账户变动日志
     * @param pageInfo
     * @param tradeType
     * @param userId
     * @return
     */
    void getUserAccountDetailPage(Page<UserAccountDetail> pageInfo, String tradeType, Long userId);
}
